//
//  MTTypeTableViewCell.swift
//  MT
//
//  Created by ooops on 2020/5/29.
//  Copyright © 2020 张强. All rights reserved.
//

import UIKit
import MTCategory

class MTTypeTableViewCell: UITableViewCell {
    
    class func reuseIdentity() -> String {
        return "MTTypeTableViewCellID"
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        setupUI()
        makeConstraint()
        self.selectionStyle = .none
    }
    
    private func setupUI() {
        contentView.addSubview(iconImageView)
        contentView.addSubview(nameLabel)
    }
    
    private func makeConstraint() {
        iconImageView.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.centerX.equalToSuperview().offset(-35)
            make.size.equalTo(CGSize(width: 24, height: 24))
        }
        
        nameLabel.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.left.equalTo(iconImageView.snp.right).offset(5)
        }
    }
    
    lazy var iconImageView: UIImageView = {
        let imageV = UIImageView()
        return imageV
    }()
    
    lazy var nameLabel: UILabel = {
        let l = UILabel()
        l.font = PingFangSCMediumFont(14)
        l.textColor = UIColor.text.x1d1a1a
        return l
    }()
    
    required public init?(coder: NSCoder) {
        super.init(coder: coder)
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
